package com.chester.springbootseventeen.utils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class ParamUtils {

    public static <T> T parse(JSONObject source, Class<T> clazz){
        T result = JSON.parseObject(source.toString(), clazz);

        log.trace(result.toString());
        return result;
    }
}
